package com.util;

import java.sql.Connection;
import java.sql.DriverManager;


public class DButil {
	public static Connection getConnection(){
		Connection connection = null;
		String url = "jdbc:mysql://localhost:3306/dbutils";
		String user = "root";
		String password = "root";
		
		
		try {
			Class .forName("com.mysql.jdbc.Driver");
			connection = DriverManager.getConnection(url, user, password);
			
		} catch (Exception e) {
			e.printStackTrace();
			// TODO: handle exception
		}
		return connection;
	}

	public static void main(String[] args) {
		System.out.println(DButil.getConnection());
	}
	}


